package com.baozhun.mall.common.model.bean

import com.baozhun.mall.common.R
import com.baozhun.mall.common.base.BaseApplication
import com.baozhun.mall.common.model.enums.OrderStatus
import java.io.Serializable

/**
 * @Title：订单信息model
 * @Description：
 * @Author：xing.luo
 * @Since：2022/11/20
 * @Version：1.0.0
 */
class OrderInfoBean(
    var order_no: String = "",
    var after_sale_no: String = "",
    var userName: String = "",
    var userAvatar: String = "",
    var goods_id: String? = "",
    var goods_name: String? = "",
    var goods_spec_info: String? = "",
    var goods_cover: String? = "",
    var price: String? = "",
    var num: String? = "",
    var order_status: Int = 0, //10 待支付 20 待发货 30 待收货 40 已收货 50 已完成 60 已取消 70 已关闭
    var order_status_name: String? = "", //10 待支付 20 待发货 30 待收货 40 已收货 50 已完成 60 已取消 70 已关闭
    var pay_amount: String? = "", //订单总金额 分
    var pay_expire_time: Long,//支付剩余时间s
    var points: String = "",
    var return_score: String = "",
    var after_sale_status: Int = 0,
    var after_sale_status_name: String = "",
) : Serializable {

    fun numFormat(): String {
        return "x${num}"
    }

    fun getOrderStatusDesc(): String {
        return if (order_status_name.isNullOrEmpty()) after_sale_status_name else order_status_name.toString()
    }

}